// App.tsx
import React from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import LoginPage from './pages/LoginPage';
import MainLayout from './MainLayout';
import UserManage from './pages/UserMgr'
import ModelVersionControl from './pages/ModelVersionControl'
import PrivateRoute from './components/PrivateRoute';
import IndicatorSetting from './pages/IndicatorSetting'
import NewSurvey from './pages/NewSurvey'
import AnswerSurvey from './pages/AnswerSurvey'

const App: React.FC = () => {
   
  return (
    <Router>
        
      <Routes>
        <Route path="/login" element={<LoginPage />} />
        <Route path="/userManage" element={<PrivateRoute element={<UserManage />} />} />
        <Route path="/modelVersionControl" element={<PrivateRoute element={<ModelVersionControl />} />} />
        <Route path="/*" element={<PrivateRoute element={<MainLayout />} />} />
        <Route path="/indicatorSetting" element={<PrivateRoute element={<IndicatorSetting />} />} />
        <Route path="/newSurvey" element={<PrivateRoute element={<NewSurvey/>} /> } />
        <Route path="/answerSurvey" element={<PrivateRoute element={<AnswerSurvey/>} /> } />
      </Routes>
    </Router>
  );
};

export default App;
